<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="${sPname}_approval_process" name="${jComment}审批流程" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="${sPname}_approval" name="招商部" activiti:assignee="${r"${"}applicant}" activiti:formKey="${jPname}ApprovalCheck">
      <documentation>{"businessType":"${jPname}ApprovalCheck","departmentCode":"100002","gatewayName":"gateWay0"}</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="com.yst.workflow.task.listener.NodeTaskListener"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="${sPname}_approval"></sequenceFlow>
    <userTask id="${sPname}_approval_check1" name="营销副总" activiti:formKey="${jPname}ApprovalCheck1">
      <documentation>{"businessType":"${jPname}ApprovalCheck1","departmentCode":"100003","gatewayName":"gateWay1"}</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="com.yst.workflow.task.listener.NodeTaskListener"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway" default="flow5"></exclusiveGateway>
    <sequenceFlow id="flow3" sourceRef="${sPname}_approval_check1" targetRef="exclusivegateway1"></sequenceFlow>
    <endEvent id="endevent1" name="End">
      <extensionElements>
        <activiti:executionListener event="start" class="com.yst.workflow.task.listener.EndTaskListener"></activiti:executionListener>
      </extensionElements>
    </endEvent>
    <sequenceFlow id="flow4" name="同意" sourceRef="exclusivegateway1" targetRef="${sPname}_approval_check2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${r"${"}${sPname}_approval_check1IsApprove==1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow5" name="驳回" sourceRef="exclusivegateway1" targetRef="${sPname}_approval"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway" default="flow8"></exclusiveGateway>
    <sequenceFlow id="flow6" sourceRef="${sPname}_approval" targetRef="exclusivegateway2"></sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="exclusivegateway2" targetRef="${sPname}_approval_check1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${r"${"}cancel==false}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow8" name="撤销" sourceRef="exclusivegateway2" targetRef="endevent1"></sequenceFlow>
    <userTask id="${sPname}_approval_check2" name="财务负责人" activiti:formKey="${jPname}ApprovalCheck2">
      <documentation>{"businessType":"${jPname}ApprovalCheck2","departmentCode":"100003","gatewayName":"gateWay2"}</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="com.yst.workflow.task.listener.NodeTaskListener"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <userTask id="${sPname}_approval_check3" name="财务副总" activiti:formKey="${jPname}ApprovalCheck3">
      <documentation>{"businessType":"${jPname}ApprovalCheck3","departmentCode":"100003","gatewayName":"gateWay3"}</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="com.yst.workflow.task.listener.NodeTaskListener"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <userTask id="${sPname}_approval_check4" name="总经理" activiti:formKey="${jPname}ApprovalCheck4">
      <documentation>{"businessType":"${jPname}ApprovalCheck4","departmentCode":"100003","gatewayName":"gateWay4"}</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="com.yst.workflow.task.listener.NodeTaskListener"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway" default="flow11"></exclusiveGateway>
    <sequenceFlow id="flow9" sourceRef="${sPname}_approval_check2" targetRef="exclusivegateway3"></sequenceFlow>
    <sequenceFlow id="flow10" name="同意" sourceRef="exclusivegateway3" targetRef="${sPname}_approval_check3">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${r"${"}${sPname}_approval_check2IsApprove==1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow11" name="驳回" sourceRef="exclusivegateway3" targetRef="${sPname}_approval"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway4" name="Exclusive Gateway" default="flow16"></exclusiveGateway>
    <sequenceFlow id="flow12" sourceRef="${sPname}_approval_check3" targetRef="exclusivegateway4"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway5" name="Exclusive Gateway" default="flow15"></exclusiveGateway>
    <sequenceFlow id="flow13" name="同意" sourceRef="exclusivegateway4" targetRef="${sPname}_approval_check4">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${r"${"}${sPname}_approval_check3IsApprove==1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow14" sourceRef="${sPname}_approval_check4" targetRef="exclusivegateway5"></sequenceFlow>
    <sequenceFlow id="flow15" name="驳回" sourceRef="exclusivegateway5" targetRef="${sPname}_approval"></sequenceFlow>
    <sequenceFlow id="flow16" name="驳回" sourceRef="exclusivegateway4" targetRef="${sPname}_approval"></sequenceFlow>
    <sequenceFlow id="flow17" name="同意" sourceRef="exclusivegateway5" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${r"${"}${sPname}_approval_check4IsApprove==1}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_${sPname}_approval_process">
    <bpmndi:BPMNPlane bpmnElement="${sPname}_approval_process" id="BPMNPlane_${sPname}_approval_process">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="190.0" y="163.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="${sPname}_approval" id="BPMNShape_${sPname}_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="280.0" y="153.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="${sPname}_approval_check1" id="BPMNShape_${sPname}_approval_check1">
        <omgdc:Bounds height="74.0" width="105.0" x="280.0" y="340.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="470.0" y="356.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="315.0" y="463.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="40.0" width="40.0" x="312.0" y="250.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="${sPname}_approval_check2" id="BPMNShape_${sPname}_approval_check2">
        <omgdc:Bounds height="55.0" width="105.0" x="580.0" y="349.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="${sPname}_approval_check3" id="BPMNShape_${sPname}_approval_check3">
        <omgdc:Bounds height="55.0" width="105.0" x="580.0" y="182.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="${sPname}_approval_check4" id="BPMNShape_${sPname}_approval_check4">
        <omgdc:Bounds height="55.0" width="105.0" x="758.0" y="349.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway3" id="BPMNShape_exclusivegateway3">
        <omgdc:Bounds height="40.0" width="40.0" x="612.0" y="271.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway4" id="BPMNShape_exclusivegateway4">
        <omgdc:Bounds height="40.0" width="40.0" x="790.0" y="189.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway5" id="BPMNShape_exclusivegateway5">
        <omgdc:Bounds height="40.0" width="40.0" x="790.0" y="460.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="225.0" y="180.0"></omgdi:waypoint>
        <omgdi:waypoint x="280.0" y="180.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="385.0" y="377.0"></omgdi:waypoint>
        <omgdi:waypoint x="470.0" y="376.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="510.0" y="376.0"></omgdi:waypoint>
        <omgdi:waypoint x="580.0" y="376.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="518.0" y="385.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="490.0" y="356.0"></omgdi:waypoint>
        <omgdi:waypoint x="490.0" y="180.0"></omgdi:waypoint>
        <omgdi:waypoint x="385.0" y="180.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="460.0" y="301.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="332.0" y="208.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="250.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="332.0" y="290.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="312.0" y="270.0"></omgdi:waypoint>
        <omgdi:waypoint x="207.0" y="270.0"></omgdi:waypoint>
        <omgdi:waypoint x="207.0" y="405.0"></omgdi:waypoint>
        <omgdi:waypoint x="207.0" y="480.0"></omgdi:waypoint>
        <omgdi:waypoint x="315.0" y="480.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="217.0" y="277.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="632.0" y="349.0"></omgdi:waypoint>
        <omgdi:waypoint x="632.0" y="311.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="632.0" y="271.0"></omgdi:waypoint>
        <omgdi:waypoint x="632.0" y="237.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="637.0" y="251.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
        <omgdi:waypoint x="612.0" y="291.0"></omgdi:waypoint>
        <omgdi:waypoint x="521.0" y="290.0"></omgdi:waypoint>
        <omgdi:waypoint x="521.0" y="143.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="153.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="543.0" y="292.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="685.0" y="209.0"></omgdi:waypoint>
        <omgdi:waypoint x="790.0" y="209.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
        <omgdi:waypoint x="810.0" y="229.0"></omgdi:waypoint>
        <omgdi:waypoint x="810.0" y="349.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="800.0" y="276.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
        <omgdi:waypoint x="810.0" y="404.0"></omgdi:waypoint>
        <omgdi:waypoint x="810.0" y="460.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
        <omgdi:waypoint x="830.0" y="480.0"></omgdi:waypoint>
        <omgdi:waypoint x="910.0" y="480.0"></omgdi:waypoint>
        <omgdi:waypoint x="910.0" y="85.0"></omgdi:waypoint>
        <omgdi:waypoint x="454.0" y="85.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="153.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="869.0" y="403.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">
        <omgdi:waypoint x="810.0" y="189.0"></omgdi:waypoint>
        <omgdi:waypoint x="809.0" y="120.0"></omgdi:waypoint>
        <omgdi:waypoint x="492.0" y="120.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="153.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="772.0" y="141.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">
        <omgdi:waypoint x="790.0" y="480.0"></omgdi:waypoint>
        <omgdi:waypoint x="350.0" y="480.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="554.0" y="480.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>